import { getGameObjectById } from "../engine";
import { Behaviour } from "../engine/Behaviour";
import { Transform } from "../engine/Transform";
import { number } from "../engine/validators/number";
import { xinagcaiPrefabBehaviour } from "../prefabBehaviours/xinagcaiPrefabBehaviour";

export class CreateXiangcai extends Behaviour {

    onStart(): void {
        //const mianpi = getGameObjectById('pot');
        // this.gameObject.onClick = (event) => {

        //     const xiangcaiPrefabBinding = new xinagcaiPrefabBehaviour()
        //     //xiangcaiPrefabBinding.size = Math.floor(Math.random() * 30)
        //     const xiangcai = this.gameObject.engine.createNewPrefab(xiangcaiPrefabBinding)
        //     this.gameObject.addChild(xiangcai)
        //     const xiangcaiTransform = xiangcai.getBehaviour(Transform);
        //     xiangcaiTransform.x = event.posX;
        //     xiangcaiTransform.y = event.posY;
        // }
    }
}